package com.alibaba.citrus.ots.forecast.facade.service;

import com.alibaba.citrus.ots.common.annotation.FacadeInvoker;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.otsforecastsales.api.resolveinventory.service.ResolveInventoryService;
import com.epoch.app.otsforecastsales.dto.request.QueryResolveInventoryRequest;
import com.epoch.app.otsforecastsales.dto.response.QueryResolveInventoryResponse;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: qianlei
 * @create: 2021/10/20 15:50
 */
@Service
@Primary
public class ResolveInventoryServiceImpl implements ResolveInventoryService {
    @Override
    @FacadeInvoker
    public Result<QueryResolveInventoryResponse> queryResolveInventory(QueryResolveInventoryRequest queryResolveInventoryRequest) {
        QueryResolveInventoryResponse  response = new QueryResolveInventoryResponse();
        Map<String, String> map = new HashMap<>();
        //todo 黔雷
        queryResolveInventoryRequest.getScItemList().forEach(s -> map.put(s,"10000"));
        response.setInventoryMap(map);
        return Result.success(response);
    }
}
